import store from '@/store'

export default {
  methods: {
    // key 是传入的功能权限标识
    checkPermission(key) {
      // store
      return !!store?.state?.user?.userInfo?.roles?.points?.includes(key) // true是有权限 false是没有权限 !!以防断链返回undefined
    }
  }
}
